home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / os2 / srefv112.zip / ALIASES.IN next >
Text File  |  1996-05-12  |  5KB  |  95 lines

  1. ; This contains the SRE-FILTER sample alias file. 5/96
  2. ;
  3. ; General Purpose: Aliases are used to modify and transform the request string.
  4. ;
  5. ; There are several reaons for wanting to do this:
  6. ;    Substituting for common "misspellings and abbreviations" 
  7. ;    Implementing searchable indices.
  8. ;    Redirecting requests for moved URLS
  9. ;    Setting path for CGI-BIN scripts
  10. ;   (OBSOLETE)    Transferring non-data-directory files.
  11. ;;
  12. ; General Usage:  each line contains a TARGET followed by a
  13. ; REPLACEMENT.   Spaces should seperate these two items.  
  14. ; The TARGET should  have NO embedded spaes.
  15. ; Also note that in the TARGET, we convert / to \, and drop any leading / (or \).
  16. ;
  17. ;  SRE-FILTER attempts to (exact or wildcard) match the request string 
  18. ;  with each TARGET.   
  19. ;  If a match is found, the request string is replaced by the
  20. ;  REPLACEMENT, with possible "wildcard substitution".
  21. ;
  22. ;  "Wildcard substitution" occurs only if a * appears in the REPLACEMENT 
  23. ;  and in the TARGET.  When this occurs, and the request string  "wildcard" 
  24. ;  matches the TARGET, a textual substitution will occur in the REPLACEMENT.
  25. ;  Specifically, the * in the REPLACEMENT will be removed, and 
  26. ;  the portion of the request string "covered" by the * (in the
  27. ;  TARGET) will be inserted in it's place.
  28. ;      Examples,given:
  29. ;          Request string: /CATS/A14.HTM
  30. ;              an an alias entry with
  31. ;          Target:  /CATS/*
  32. ;          Replacement: /SHOP1/PETS/FELINES/PUREBRED/*
  33. ;        will yield:
  34. ;                  /SHOP1/PETS/FELINES/PUREBRED/A14.HTM
  35. ;        Note that the A14.HTM in the request string is "covered" 
  36. ;        by the * in the TARGET.
  37. ;
  38. ;  ----------------- Some Examples   -------------------
  39. ;
  40. ; 1) Replace a "misspelling or abbreviation" with a URL
  41. ;      INDEX INDEX.HTM
  42. ;
  43. ; 2) Implementing searchable indices (using SRE-FILTER's DOSEARCH utility)
  44. ;    In this example, CONGRESS.DAT will be searched using the search
  45. ;    parameters returned by the client
  46. ;       TESTSRCH.HTM?* DOSEARCH?file=/congress.dat&searchfor=*&delim=$
  47. ;    If ROOTC/ is a virtual directory for  C:\USERS\, this will search
  48. ;    C:\USERS\JOES.LST
  49. ;       LOOKUSER.HTM?* dosearch?file=/ROOTC/JOES.LST&searchfor=*&delim=0
  50. ;
  51. ; 3) The next 3 examples performs redirectons.
  52. ;   i) This (note use of a full URL, including the http://)
  53. ;      causes a "temporary move"  (http status code 302) redirection.
  54. ;         YAH* http://www.yahoo.com/
  55. ;   ii)Specifies the same thing, but the URL that follows
  56. ;      need not be comletely specified (if the ip domain is left out, it is
  57. ;      assumed to be to be back to your server.) Of course, to be safe one
  58. ;      should always specify the full URL (complete with http://)
  59. ;         WAH* !MOVED www.yahoo.com/
  60. ;   iii) A "permanent" move (http code 301) otherwise it's the same as example ii.
  61. ;       ZAH* !TEMP http://www.yahoo.com/
  62. ;
  63. ;       Notes  case is sometimes crucial when specifying URLs.
  64. ;
  65. ; 4) Specifying location of CGI-BIN script.
  66. ;     This example instructs SRE-FILTER to look for SCRIPT10 in d:\PROGS\NEW
  67. ;     (rather the the default, "cgi_bin_dir", script directory)
  68. ;           SCRIPT10   d:\progs\new
  69. ;
  70. ; 5) Transfering files from anywhere (OBSOLETE-- we recommend use of
  71. ;    virtual directories instead).
  72. ;        GETMAP?* !TRANSFER=e:\MAPS\*
  73. ;    Note that this assumes that 1 argument is appended to the URL (say by
  74. ;    a FORM of type GET)
  75. ;
  76. ;
  77. ;  *****************************  CAUTION   ******************************
  78. ;          Unless you explicitly want to "alias" actual files, directories,
  79. ;          or "server side program" names...
  80. ;                 we HIGHLY RECOMMEND that all entries in this file
  81. ;                    have "targets" that do NOT MATCH pre-existing files,
  82. ;                              directories, or "actions".
  83. ;         {and be especially careful if you are using any wildcard matches)
  84. ;
  85. ; ---- - - --------  End of samples --- - - - - - -- - -
  86. ;
  87. ;  The following are included just as examples, they can be removed with
  88. ;  little ill effect.  Note that the dopublic alias is designed
  89. ;  to work with the default "public_files" entries (set in initiflt.80)
  90. SAMPLES/TESTSRCH.HTM?* DOSEARCH?file=samples/congress.dat&delim=$&search=*
  91. INDEX INDEX.HTM
  92. WEBSEARCH/* http://www.webcrawler.com/cgi-bin/WebQuery/?*
  93. dopublic getafile?dir=pubfiles/&showsize=yes&showdate=yes&showdir=yes&rootdir=pubfiles/&dispfile=read.me+Description+of+files&table=key&usedl=YES&tablefile=files.key+file+descriptions
  94.  
  95.